package com.pwser.po;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * ShiroUser entity. @author MyEclipse Persistence Tools
 */

public class ShiroUser implements java.io.Serializable {

	// Fields

	private Long userId;
	private Long deptId;
	private String loginAccount;
	private String loginPass;
	private String userName;
	private String userPhone;
	private String userEmail;
	private String userSex;
	private String lastLoginIp;
	private Date lastLoginTime;
	private Date registerTime;
	private String loginStatus;
	
	private List<ShiroRole> roles = new ArrayList<ShiroRole>();
	private List<ShiroMenu> menus = new ArrayList<ShiroMenu>();;

	// Constructors

	/** default constructor */
	public ShiroUser() {
	}

	/** minimal constructor */
	public ShiroUser(Long userId) {
		this.userId = userId;
	}

	/** full constructor */
	public ShiroUser(Long userId, Long deptId, String loginAccount,
			String loginPass, String userName, String userPhone,
			String userEmail, String userSex, String lastLoginIp,
			Date lastLoginTime, Date registerTime, String loginStatus) {
		this.userId = userId;
		this.deptId = deptId;
		this.loginAccount = loginAccount;
		this.loginPass = loginPass;
		this.userName = userName;
		this.userPhone = userPhone;
		this.userEmail = userEmail;
		this.userSex = userSex;
		this.lastLoginIp = lastLoginIp;
		this.lastLoginTime = lastLoginTime;
		this.registerTime = registerTime;
		this.loginStatus = loginStatus;
	}

	// Property accessors

	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getDeptId() {
		return this.deptId;
	}

	public void setDeptId(Long deptId) {
		this.deptId = deptId;
	}

	public String getLoginAccount() {
		return this.loginAccount;
	}

	public void setLoginAccount(String loginAccount) {
		this.loginAccount = loginAccount;
	}

	public String getLoginPass() {
		return this.loginPass;
	}

	public void setLoginPass(String loginPass) {
		this.loginPass = loginPass;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPhone() {
		return this.userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	public String getUserEmail() {
		return this.userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserSex() {
		return this.userSex;
	}

	public void setUserSex(String userSex) {
		this.userSex = userSex;
	}

	public String getLastLoginIp() {
		return this.lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	public Date getLastLoginTime() {
		return this.lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public Date getRegisterTime() {
		return this.registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	public String getLoginStatus() {
		return this.loginStatus;
	}

	public void setLoginStatus(String loginStatus) {
		this.loginStatus = loginStatus;
	}

	public List<ShiroRole> getRoles() {
		return roles;
	}

	public void setRoles(List<ShiroRole> roles) {
		for (ShiroRole role : roles) {
			this.roles.add(role);
		}
	}

	public List<ShiroMenu> getMenus() {
		return menus;
	}

	public void setMenus(List<ShiroMenu> menus) {
		for (ShiroMenu menu : menus) {
			this.menus.add(menu);
		}
	}

}